/**

 * @author hanzhendong

 * @date 2023/10/9 13:05

 */
import Vue from "vue";



//获取文件上下文
let files = require.context(".",true,/\.js$/);
export default {
  install(){
    files.keys().forEach((directives)=>{
      if (directives === "./index.js") return;
      let key = directives.replace(/(\.\/|\/index.js$)/g, "").toLowerCase();
      console.log(key,'指令')
      Vue.directive(key,files(directives).default);
    })
  }
}
